import { fetchGet, fetchPost, fetchDel, fetchGetDown, fetchPostDown } from '@/axios'
const employeeEntry = {
  //   查询所有考勤人员
  getEmployeeEntryList (name) {
    return fetchGet(`/api/empEntFormInfos/selectAll?name=${name}`)
  },
  // 分页查询表格数据请求
  postEmployeeEntry (page, pageSize) {
    return fetchGet(
      `/api/empEntFormInfos/page?page=${page}&pageSize=${pageSize}`
    )
  },
  //   上传文件
  uploadEmployeeEntry (params) {
    return fetchPostDown('/api/empEntFormInfos/upload', params)
  },
  // 入职员工批量删除
  deleteEmployee (id) {
    return fetchDel(`/api/empEntFormInfos/delete?empStaNum=${id}`)
  },
  // 更新员工转正
  updataEmployee (params) {
    return fetchPost('/api/empentformInfo/update', params)
  },
  // 入职员工所有数据下载
  downloadAllEmployee () {
    return fetchGetDown('/api/empEntFormInfos/downloadAll')
  },
  // 入职员工当前数据下载
  downloadEmployee (page, pageSize) {
    return fetchGetDown(`api/empEntFormInfos/download?page=${page}&pageSize=${pageSize}`)
  },
  updateEmployee (params) {
    return fetchPost('/api/empEntFormInfos/update', params)
  }
}
export default employeeEntry
